package orgcxmzxy.xyj;

public class Pet {
    private String type;
    private int age;
    private boolean vaccinum;
    public void setType(String type){
        this.type = type;
    }
    public void setAge(int age){
        this.age = age;
    }
    public void setVaccinum(boolean vaccinum){
        this.vaccinum = vaccinum;
    }
    public String getType(){
        return type;
    }
    public int getAge(){
        return age;
    }
    public void healthStatus(){
        if(vaccinum == true){
            System.out.println("宠物已接种疫苗，身体健康");
        }else {
            System.out.println("宠物未接种疫苗，健康堪忧");
        }
    }
    public void print(){
        System.out.println("宠物的类型为"+type);
        System.out.println("宠物今年"+age+"岁");
    }
}
